<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="my" uri="/WEB-INF/my.tld"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
		<title>显示委员会分数评审信息</title>
		<link rel="stylesheet" href="../../css/css.css" type="text/css"></link>
		<link rel="stylesheet" href="../../css/counter.css" type="text/css"></link>
		<script src="<%=basePath%>/javascript/jquery.js"></script>
		<style type="text/css">
td{
font-size: 12px;
}
.buttonface {
	background:#999 url(../../images/21_08.gif);
	background-repeat:repeat;
	border: none;
	COLOR: #4c4c4c;
	FONT-SIZE: 12px;
	FONT-STYLE: normal;
	FONT-VARIANT: normal;
	FONT-WEIGHT: normal;
	width: 69px;
	HEIGHT: 21px;
	LINE-HEIGHT: normal;
	cursor:pointer;
}
</style>
		<script type="text/javascript"> 
		$(document).ready(
		function() { 
		  $("#checkAll").click(
		  function(){  selectAll(this);}
		          );
		  $(":checkbox").click(
		  function(){
		  if($(this).attr("checked")==true){ 
		            $(this).parent("td").parent("tr").attr("bgcolor","#CC9933");   
                    }else{
                       $(this).parent("td").parent("tr").removeAttr("bgcolor");
                    }
		  
		  }
		  
		  );
		});
		
		
function selectAll(self){
   $(":checkbox").each(
	 function(){
		         if($(self).attr("checked")==true){ 
		            $(this).parent("td").parent("tr").attr("bgcolor","#CC9933");   
                    $(this).attr("checked","checked");
                    }else{
                       $(this).parent("td").parent("tr").removeAttr("bgcolor");
                       $(this).removeAttr("checked");    
                    }
              }
                    
   );
		
}
		
		
		
		
     function sortResultShow()
           {
               window.location.href('listVoteResultSort.action');
           }
     function sortZhuanyeShow()
           {
               window.location.href('listVoteResult.action');
           }
           function formSubmit()
           {
             var checkFlag=0;
              $(":checkbox[@reviewCheck='thirdReview']").each(function(){            
                    if($(this).attr("checked")==true){    
                      checkFlag=1;
                    }
                });
                if(checkFlag==1)
                {
                    if(confirm("请确认您已经勾选项目前面的勾选框"))
                        {
                         voteResult.submit();
                        }
                }
                else{
                
                  alert("请先选择项目");
                }
             
            
           }
</script>
	</head>

	<body>
		<table>
			<tr>

				<td colspan="10">
					<IMG src="../../images/manage/arron1.gif">
					<FONT class="font_lv">查询投票结果 &nbsp;&nbsp;&nbsp;应评票数：</FONT>
					<s:property value="assignExpertCount" />
					<FONT class="font_lv">&nbsp;&nbsp;票</FONT>
					<FONT class="font_lv">&nbsp;已评票数：</FONT>
					<s:property value="alreadyVoteExpertCount" />
					<FONT class="font_lv">&nbsp;&nbsp;票&nbsp;&nbsp;&nbsp;&nbsp;</FONT>
					<s:if test="${!empty voteList}">
						<input type="button" value="奖级排序" class="buttonface"
							onclick="sortResultShow()">&nbsp;
						<input type="button" value="专业排序" class="buttonface"
							onclick="sortZhuanyeShow()">&nbsp;
						<s:if test="${my:checkYear()}">
							<s:if test="${assignExpertCount==alreadyVoteExpertCount}">
								<input type="button" value="生成结果" class="buttonface"
									onclick="formSubmit()">
							</s:if>
						</s:if>
					</s:if>
				</td>
			</tr>
		</table>
		<form action="createFinalVoteResult.action" method="post"
			name="voteResult">
			<table cellSpacing="1" cellPadding="1" width="100%" align="center"
				border="0">
				<tr>
					<td class=line>
						<table cellSpacing="1" cellPadding="1" width="100%" align="center"
							border="0" bgcolor="#CCCCCC">

							<tr>

								<td width="5%" align="center"
									background="../../images/manage/title_bg.jpg"
									class="font_12_B_w">
									序号
									<input type="checkbox" id="checkAll" />
								</td>
								<td width="14%" align="center"
									background="../../images/manage/title_bg.jpg"
									class="font_12_B_w">
									项目名称
								</td>
								<td width="20%" align="center"
									background="../../images/manage/title_bg.jpg"
									class="font_12_B_w">
									建议等级
								</td>
								<td width="40%" align="center"
									background="../../images/manage/title_bg.jpg"
									class="font_12_B_w">
									投票结果
								</td>
								<td width="10%" align="center"
									background="../../images/manage/title_bg.jpg"
									class="font_12_B_w">
									计算结果
								</td>
							</tr>
							<s:if test="${!empty voteList}">
								<s:iterator value="voteList" status="vote">
									<s:if test="${passThirdCheck eq true}">
										<tr bgcolor="#CC9933">
									</s:if>
									<s:else>
										<s:if test="#vote.odd==true">
											<tr bgcolor="#FFFFCC">
										</s:if>
										<s:else>
											<tr bgcolor="#FFFFFF">
										</s:else>
									</s:else>
									<s:if test="${passThirdCheck eq true}">
										<td align="center" width="5%">
											<s:property value="${vote.count}" />
											<input type="checkbox" checked="checked"
												name="voteList[${vote.index}].toThirdCheck"
												reviewCheck="thirdReview" value="1" />
										</td>
									</s:if>
									<s:else>
										<td align="center" width="5%">
											<s:property value="${vote.count}" />
											<input type="checkbox"
												name="voteList[${vote.index}].toThirdCheck"
												reviewCheck="thirdReview" value="1" />
										</td>
									</s:else>
									</td>
									<td width="14%" align="left">
										<s:property value="basicInfoName" />
										<input type="hidden"
											name="voteList[${vote.index}].basicInfoId"
											value="${basicInfoId}" />
									</td>
									<td width="20%" align="center">
										<s:property value="xk" />
										组
										<br />
										建议为
										<s:property value="jydjName" />
										<input type="hidden" name="voteList[${vote.index}].jydjId"
											value="${jydjId}" />
									</td>
									<td width="40%" align="left">
										特等奖：
										<FONT color="red"><s:property
												value="outstandingWinnerCount" /> </FONT>票&nbsp; 一等奖：
										<FONT color="red"><s:property value="firstPrizeCount" />
										</FONT>票&nbsp; 二等奖:
										<FONT color="red"><s:property value="secondPrizeCount" />
										</FONT>票&nbsp; 三等奖:
										<FONT color="red"><s:property value="thirdPrizeCount" />
										</FONT>票&nbsp;弃权:
										<FONT color="red"><s:property value="abstentionCount" />
										</FONT>票
									</td>
									<td width="10%" align="center">
										<s:property value="finalPrize" />
										(
										<font color="red"><s:property value="finalPrizeCount" />
										</font>票)
										<input type="hidden"
											name="voteList[${vote.index}].finalPrizeId"
											value="${finalPrizeId}" />
										<input type="hidden"
											name="voteList[${vote.index}].finalPrizeCount"
											value="${finalPrizeCount}" />
									</td>
									</tr>
								</s:iterator>
							</s:if>
							<s:else>
								<tr>
									<td colspan="5" align="center">
										还没有开始投票，请先进行投票！

									</td>
								</tr>
							</s:else>
						</table>
					</td>
				</tr>
			</table>
		</form>
	</body>
</html>

